import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
//1.引入element-plus组件库
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
//3.引入Element-plus图标库
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

//4.遍历ElementPlusIconsVue图标库,将其中所有的图标组件依次注册到app中
const app = createApp(App)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

//第10行已经创建,此处直接引用即可
//2.app.use(ElementPlus) 使用Element-plus组件库
app.use(ElementPlus).use(store).use(router).mount('#app')
